package io.zhengsh.vvip.leetcode.binarysearch;

public class Q153_Find_Minnum_In_Retated_Sorted_Array {

    class Solution {
        public int findMin(int[] nums) {
            int low = 0, high = nums.length - 1;
            while (low < high) {
                int mid = (high - low) / 2 + low;
                if (nums[low] < nums[high]) {
                    high = mid;
                } else {
                    low++;
                }
            }
            return nums[low];
        }
    }
}
